package com.cy.web.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LogResult {
    /**状态码*/
    private Integer state=1;
    /**消息*/
    private String massage="ok";
    /**具体数据*/
    private Object data;

    public LogResult(Object data) {
        this.data = data;
    }

    public LogResult(String massage) {
        this.massage = massage;
    }

    public LogResult(Integer state) {
        this.state = state;
    }

    public LogResult(Integer state, String massage) {
        this.state = state;
        this.massage = massage;
    }
    public LogResult(Throwable e){
        this.state=0;
        this.massage=e.getMessage();
    }

    public LogResult(String massage, Object data) {
        this.massage = massage;
        this.data = data;
    }
}
